import { ElMessage } from 'element-plus'
import useClipboard from 'vue-clipboard3'

export const copyClick = async (item: string) => {
  try {
    const { toClipboard } = useClipboard()
    await toClipboard(item)
    ElMessage({
      type: 'success',
      message: '复制成功'
    })
  } catch (e) {
    console.error(e)
  }
}
